Skip to main content
Version: 1.1.0

Auth API

Auth API

This is the Auth Service

Paths

/auth/api/v1/healthz

GET /auth/api/v1/healthz

  • Summary: Health
  • Description: Return Health Status.

Responses

  • 200: Successful Response
    • Content
      • application/json
        • Schema: Msg

/auth/api/v1/oauth/connect/token

POST /auth/api/v1/oauth/connect/token

  • Summary: Get Access Token For Client Service Authentication
  • Description: "Get Access token, Refresh token for Client Login" refers to the operation of obtaining both an access token and a refresh token using client authentication, enabling authenticated access to protected resources and token renewal without re-authentication.

Request Body

TypeParameterDescriptionData Typeis_optional
Query ParameterrealmID for the OAuth realm.string (UUID)optional
Query Parameterclient_idclient_id associated with a realm.stringmandatory
Query Parameterclient_secretclient_secret for the client_id.stringmandatory
Query Parametergrant_typeType of grant being requested.stringoptional
Query ParameterscopesScopes requested for the access token.stringoptional

Example response -

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwiaFwTMHhbqSXtiNkvUlcp0pMdDYy6nZ6E8-2Lg",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAMF31HZzy865t7DabmSpX03T4UZO-TTvvh5B4QyG1so",
"token_type": "Bearer",
"not-before-policy": 0,
"session_state": "5225b959-0507-4b32-98fb-76aec1110ad8",
"scope": "email profile"
}

Responses

Status CodeDescriptionContent TypeDetails
200Access token generatedapplication/jsonSchema provided in response example
400Bad Requestapplication/jsonExample provided
401Authentication failedapplication/jsonExample provided
404Realm not foundapplication/jsonExample provided
422Validation Errorapplication/jsonSchema: HTTPValidationError
500Internal server errorapplication/jsonExample provided

Get Access Token For User Login -

/auth/api/v1/oauth/connect/user/login

POST /auth/api/v1/oauth/connect/user/login

  • Summary: Get Access Token For User Login
  • Description: "Get Access token, Refresh token for User Login" describes the process of acquiring an access token and a refresh token upon successful user authentication

Request Body

TypeParameterDescriptionData Typeis_optional
Query ParameterrealmID for the OAuth realm.string (UUID)optional
Query ParameterusernameUsername associated with the request.stringmandatory
Query ParameterpasswordPassword associated with the username.stringmandatory
Query Parametergrant_typeType of grant being requested.stringoptional
Query ParameterscopesScopes requested for the access token.stringoptional

Example response -

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwiaFwTMHhbqSXtiNkvUlcp0pMdDYy6nZ6E8-2Lg",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAMF31HZzy865t7DabmSpX03T4UZO-TTvvh5B4QyG1so",
"token_type": "Bearer",
"not-before-policy": 0,
"session_state": "5225b959-0507-4b32-98fb-76aec1110ad8",
"scope": "email profile"
}

Responses

Status CodeDescriptionContent TypeDetails
200Access token generatedapplication/jsonSchema provided in response example
400Bad Requestapplication/jsonExample provided
401Authentication failedapplication/jsonExample provided
404Realm not foundapplication/jsonExample provided
422Validation Errorapplication/jsonSchema: HTTPValidationError
500Internal server errorapplication/jsonExample provided

/auth/api/v1/oauth/connect/introspect

POST /auth/api/v1/oauth/connect/introspect

  • Summary: Introspect Access Token
  • Description: "Validate Access Token" refers to the process of verifying the authenticity, expiration, and permissions associated with a given access token

Request Body -

TypeParameterDescriptionData Typeis_optional
parametertokenID for the OAuth realm.string (UUID)optional
parameterrealmID for the OAuth realmstringmandatory

Example response -

{
"exp": 1700739696,
"iat": 1700739396,
"jti": "397a8f0b-377c-45d2-bb96-7ef77a1b9395",
"iss": "http://localhost:8180/realms/lm-lor-ng",
"sub": "cafde8af-6715-4870-b0e4-c3a3b46b35c6",
"typ": "Bearer",
"azp": "ai-workbench-service",
"session_state": "08e24cea-79ff-4c0d-9d4b-858405523191",
"preferred_username": "service-account-ai-workbench-service",
"email_verified": "false",
"realm_access": {
"roles": [
"default-roles-lm-lor-ng"
]
},
"scope": "email profile",
"sid": "08e24cea-79ff-4c0d-9d4b-858405523191",
"clientId": "ai-workbench-service",
"clientHost": "172.22.160.1",
"clientAddress": "172.22.160.1",
"client_id": "ai-workbench-service",
"username": "service-account-ai-workbench-service",
"active": "true"
}

Responses

Status CodeDescriptionContent TypeDetails
200Access token generatedapplication/jsonSchema provided in response example
400Bad Requestapplication/jsonExample provided
401Authentication failedapplication/jsonExample provided
404Realm not foundapplication/jsonExample provided
422Validation Errorapplication/jsonSchema: HTTPValidationError
500Internal server errorapplication/jsonExample provided

Components

Schemas

  • Msg
  • TokenRequest
  • UserLoginRequest
  • HTTPValidationError

(Definitions for schemas should be provided here based on the JSON definitions)